static unsigned int opt_dom0_mem;
static void parse_dom0_mem(char *s)
{
- unsigned long long bytes = memparse(s);
+ unsigned long long bytes = parse_size_and_unit(s);
/* If no unit is specified we default to kB units, not bytes. */
if ( isdigit(s[strlen(s)-1]) )
opt_dom0_mem = (unsigned int)bytes;
/* opt_mem: Limit of physical RAM. Any RAM beyond this point is ignored. */
unsigned long long opt_mem;
-static void parse_mem(char *s) { opt_mem = memparse(s); }
+static void parse_mem(char *s) { opt_mem = parse_size_and_unit(s); }
custom_param("mem", parse_mem);
struct e820map e820;
#endif /* BITS_PER_LONG == 32 */
-unsigned long long memparse(char *s)
+unsigned long long parse_size_and_unit(char *s)
{
unsigned long long ret = simple_strtoull(s, &s, 0);
unsigned long long simple_strtoull(
const char *cp,char **endp, unsigned int base);
-unsigned long long memparse(char *s);
+unsigned long long parse_size_and_unit(char *s);
#endif /* __LIB_H__ */